package com.hluobo.gnnulibrary.adapter;

import com.hluobo.gnnulibrary.R;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.BaseAdapter;
import android.widget.ImageView;

public class ImageSliderAdapter extends BaseAdapter {

	private Context context;
	private LayoutInflater inflater;
	
	public ImageSliderAdapter(Context context){
		this.context = context;
		inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
	}
	
	@Override
	public int getCount() {
		return 5;
	}

	@Override
	public Object getItem(int position) {
		return null;
	}

	@Override
	public long getItemId(int position) {
		return position;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		
		View view;
		if(convertView != null){
			view = convertView;
		}else{
			view = inflater.inflate(R.layout.slider_item, parent, false);
//			view = new ImageView(context);
//			LayoutParams params = new LayoutParams(80, 80);
//		view.setLayoutParams(params);
//			view.setImageDrawable(context.getResources().getDrawable(R.drawable.announcement));
		}
		
		return view;
	}

}
